home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20031118-20041115
/
000280_thucdat@hotmail.com_Tue May 4 15:36:39 2004.msg
< prev
next >
Wrap
Internet Message Format
|
2004-11-14
|
2KB
Path: newsmaster.cc.columbia.edu!panix!newsfeed.media.kyoto-u.ac.jp!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
From: thucdat@hotmail.com (Dat Nguyen)
Newsgroups: comp.protocols.kermit.misc
Subject: The Future in C-Kermit
Date: 4 May 2004 12:30:24 -0700
Organization: http://groups.google.com
Lines: 36
Message-ID: <6b1f50ac.0405041130.1755432b@posting.google.com>
NNTP-Posting-Host: 24.118.27.71
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1083699024 32455 127.0.0.1 (4 May 2004 19:30:24 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 4 May 2004 19:30:24 +0000 (UTC)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14999
We simulate things to predict the future. Alan Kay, the grand visioner
of Smalltalk, boldly stated: "The best way to predict the future is to
create one".
Well, let's create one in C-Kermit. Yes, it doesn't have to be in
Smalltalk.
I am going to open an ice cream store, I would like to forsee the
profit. Sure and again, the whole thing is easier to do in OOP
fashion, even though I also feel at home in 8080 assembler.
The objects of this simulation are the store, the customers, the
container to keep track of the events happening at the store: customer
arrivals, customer orders, customer departures; even the random
distribution of events are objects of classes.
The same idea to handle realtime events is used here, there is a
process object with a queue waiting for events to come and executes
them.
Speaking OOP, what's about inheritance? You'll find it here! Smalltalk
allows only single inheritance, C++ and ... OOP in C-Kermit offers
both: single and multiple inheritance; but that is a subject of
another post.
In this simulation, not objects but the events are passed around,
stored and executed when time dues. Everything is very Smalltalk
alike, but written and executed entirely in C-Kermit.
The simulation of an ice cream store is implemented in Smalltalk in
the book A Little Smalltalk, by Tim Budd, Addison-Wesley 1987.
The implementation in C-Kermit is found at:
http://www.columbia.edu/kermit/ckscripts.html#oops
Dat